1. Field of the Invention
The subject invention relates to an encrypting method and apparatus, and more particularly to a method and apparatus for encrypting a key employed for encryption and for or outputting it in the form of a plain text.
2. Related Art
An encryption system always uses a secret key. For example, an RSA (Rivest, Shamir and Adelman) system which is a public key system or a DES (Data Encryption Standard) system which is a secret key system also use an additional secret key. It is required that the secret key should not be known by other persons and that the secret key should be prevented from being stolen. Thus, when the secret key itself is stored in the ROM (Read Only Memory) of a semiconductor chip, the secret key may be possibly determined from an analysis of the chip, and therefore, this method is not desirable.
In a prior art method for solving the above mentioned problem, a secret key is formed by an LFSR (Linear Feedback Shift Register). However, the LFSR requires a number of bits corresponding to the number of bits of the secret key, so that the cost of hardware has been disadvantageously increased.
The encryption apparatus of the RSA can be also used to determine the prime number of a number. The determination of the prime number is carried out, since the secret key in the RSA method must be a prime number. In the determination of the prime number, the secret key is exposed. If one encryption apparatus is employed both for determination of a prime number and for encryption, a mode which exposed a secret key and a mode which exposed the secret key will be needed. However, if the two modes are explicitly or clearly separated, a great hint will be given to a person who tries to steal the secret key. Therefore, it is not desirable to explicitly separate the modes.